FROM java:8

RUN mkdir -p /logs
RUN mkdir -p /app
VOLUME ["/app","/logs"]
EXPOSE 8080
ENV JAVA_OPTS=$JAVA_OPTS

ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -Dspring.profiles.active=prod -Dserver.port=8080 -Djava.security.egd=file:/dev/./urandom -jar /app/app.jar > /logs/catalina.out.log" ]